import axios from '@/utils/request.js'

// 按需导出登录接口
export const login = function (mobile, code) {
    return axios({
        method: 'post',
        url: '/v1_0/authorizations',
        data: {
            mobile,
            code
        }
    })
}

// 导出发送短信验证码接口
export const sendSMS = function () {
    return axios({
        method: 'get',
        url: `/v1_0/sms/codes/${mobile}`
    })
}

// 获取用户数据
export const getUserInfo = function () {
    return axios({
        url: '/v1_0/user',
        method: 'get',
        // headers: { 'Authorization': 'Bearer ' + usrToken }
    })
}

// 获取用户频道列表数据
export const getUserChannels = function () {
    return axios({
        method: 'get',
        url: '/v1_0/user/channels'
    })
}